package com.coc.service.impl;

import com.coc.mapper.DeptMapper;
import com.coc.pojo.Dept;
import com.coc.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DeptServiceImpl implements DeptService {

    @Autowired
    private DeptMapper deptMapper;

    @Override
    public List<Dept> getAllDept() {
        return deptMapper.SelectAllDept();
    }

    @Override
    public int addDept(Dept dept) {
        return deptMapper.addDept(dept);
    }

    @Override
    public int delete(Integer deptNo) {
        return deptMapper.delete(deptNo);
    }
}
